package com.qubuyer.business.mine.viewmodel

import com.qubuyer.core.framework.BaseModel
import com.qubuyer.core.http.HttpResult
import com.qubuyer.repository.entitys.MessageEntity
import com.qubuyer.repository.services.ApiService


class MsgModel : BaseModel() {
    private val api: ApiService by injectApi()

    suspend fun loadMsgList(type: Int, page: Int): HttpResult<List<MessageEntity>?> {
        return if (type == 1) api.loadActiveMsgList(page) else api.loadSysMsgList(page)
    }
}